package com.yonyou.pmclouds.workquality.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.yonyou.pmclouds.ApplicationConsts;
import com.yonyou.pmclouds.basecom.exception.BusinessException;
import com.yonyou.pmclouds.workquality.entity.WorkqualityDetailVO;
import com.yonyou.pmclouds.workquality.service.rmiitf.WorkQuaDetailMaintain;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/workquality/detail")
@RestController
public class WorkQuaDetailController {

    @Reference(version = ApplicationConsts.APPLICATION_VERSION)
    private WorkQuaDetailMaintain service;

    @PostMapping("/enable")
    public WorkqualityDetailVO enable(@RequestBody WorkqualityDetailVO detailVO) throws BusinessException {
        WorkqualityDetailVO result = service.enable(detailVO);

        return result;
    }

    @PostMapping("/disable")
    public WorkqualityDetailVO disable(@RequestBody WorkqualityDetailVO detailVO) throws BusinessException {
        WorkqualityDetailVO result = service.disable(detailVO);

        return result;
    }


}
